home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / GX Libraries / PictureLibrary.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-31  |  1.4 KB  |  47 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.     File:        PictureLibrary.c
  4.  
  5.     Contains:    graphics libraries - picture library
  6.     
  7.     Written by:    Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  8.     
  9.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  10.  
  11.     Change History (most recent first):
  12.  
  13.          <1>      1/9/95    JD        First checked in.
  14. */
  15.  
  16. #include "GraphicsLibraries.h"
  17. #include <GXMath.h>
  18.  
  19.  
  20. void AddToPicture(gxShape picture, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  21. {
  22.     GXSetPictureParts(picture, 0, 0, 1, &newShape, &newStyle, &newInk, &newTransform);
  23. }
  24.  
  25. void InsertPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  26. {
  27.     GXSetPictureParts(picture, index, 0, 1, &newShape, &newStyle, &newInk, &newTransform);
  28. }
  29.  
  30. gxShape GetPictureItem(gxShape picture, long index, gxShape *destShape, gxStyle *destStyle, gxInk *destInk, gxTransform *destTransform)
  31. {
  32.     gxShape tempShape;
  33.  
  34.     if( destShape == nil )
  35.         destShape = &tempShape;
  36.  
  37.     if( GXGetPictureParts(picture, index, 1, destShape, destStyle, destInk, destTransform) )
  38.         return *destShape;
  39.  
  40.     return nil;
  41. }
  42.  
  43. void SetPictureItem(gxShape picture, long index, gxShape newShape, gxStyle newStyle, gxInk newInk, gxTransform newTransform)
  44. {
  45.     GXSetPictureParts(picture, index, 1, 1, &newShape, &newStyle, &newInk, &newTransform);
  46. }
  47.